﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AnnualReport.aspx.cs" Inherits="UserWork_AnnualReport" %>

<%@ Register Assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI.DataVisualization.Charting" TagPrefix="asp" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>报表</title>
    <link href="../Style/MyWork.css" rel="stylesheet" />
    <style>
        /* 侧边栏样式 */
        .menus {
            list-style: none;
            padding: 0;
            margin: 0;
            transition: left 0.5s; /* 动画效果 */
            position: absolute;
            top: 100px;
            left: -200px; /* 默认隐藏 */
            bottom: 0;
            overflow-y: auto;
            float: left;
            width: 200px;
            height: 650px;
            background-color: coral;
            border-radius: 11px;
        }

            .menus li {
                padding: 3px;
            }

            .menus a {
                text-decoration: none;
                display: block;
                padding: 8px 16px;
                color: black;
            }

                .menus a:hover {
                    background-color: #555;
                    color: white;
                }
        /* 图片按钮样式 */
        .menu-toggle {
            cursor: grab;
            float: left;
        }



        .asset-gridview {
            border-collapse: collapse;
            width: 100%;
            margin-top: 10px;
        }

            .asset-gridview th {
                background-color: #4CAF50;
                color: white;
                text-align: left;
                padding: 10px;
            }

            .asset-gridview td {
                border: 1px solid #ddd;
                padding: 10px;
                text-align: left;
            }

            .asset-gridview tr:nth-child(even) {
                background-color: #f2f2f2;
            }

            .asset-gridview tr:hover {
                background-color: #ddd;
            }

            /* 上一页、下一页图片样式 */
            .asset-gridview a img {
                vertical-align: middle;
            }

        .list {
            text-decoration: none;
        }

        .imagebtn {
        }
    </style>
</head>
<body>
    <form runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
        <div id="one">
            <%--第一部分--%>
            <div id="logo">
                <img src="../Image/学校.png" alt="Alternate Text" class="menu-toggle" style="margin: 10px; width: 50px; height: 50px; float: left;" />
                <h3 style="margin-top: 22px; font-size: 20px; float: left;">高校资产管理系统</h3>
            </div>
            <div id="daohang" runat="server">
                <%--导航面板--%>
                <ul style="float: right; list-style-type: none; width: 600px;" runat="server">
                    <li style="margin-top: 6px;"><a href="../ChangePwd.aspx" class="Topstatus">修改密码</a></li>
                    <li style="margin-top: 6px;"><a href="../GetPwd.aspx" class="Topstatus">找回密码</a></li>
                    <li style="margin-top: 6px;"><a href="../MyUAMSWeb.aspx" class="Topstatus">退出登录</a></li>
                    <li></li>
                </ul>

            </div>
        </div>



        <hr align="left" size="3px" color="gray" width="920px" style="width: 100%;" />
        <%--状态栏--%>
        <div id="status">
            消息
     <asp:Label ID="lblProErr" runat="server"></asp:Label>
            <asp:Label ID="username" runat="server"></asp:Label>
        </div>


        <nav class="menus">
            <%--侧边栏--%>
            <ul>
                <li style="float: left; list-style: none; padding: 3px;">
                    <a href="MyWork.aspx" style="text-decoration: none;">我的业务</a>
                </li>
                <li style="float: left; list-style: none; padding: 3px;">
                    <a href="InsertAsset.aspx" style="text-decoration: none;">计入资产</a>
                </li>
                <li style="float: left; list-style: none; padding: 3px;">
                    <a href="AssetCategory.aspx">计入类别</a>

                </li>
                <li style="float: left; list-style: none; padding: 3px;">
                    <a href="../MaintenanceMgm/AllMaintenance.aspx">维修申请</a>

                </li>
                <li style="float: left; list-style: none; padding: 3px;">
                    <a href="../UserWork/UpdataAmount.aspx">库存管理</a>

                </li>
                <li style="float: left; list-style: none; padding: 3px;">
                    <a href="../UserWork/AssetBR.aspx">资产借还管理</a>
                </li>
            </ul>

        </nav>
        <div class="content" style="border-radius: 10px; position: absolute; top: 15%; left: 25%;">
            <%--主要内容--%>
            <asp:Label ID="dateE" runat="server"></asp:Label>
            <asp:Label ID="dateL" runat="server"></asp:Label>
            <asp:Chart ID="Chart1" runat="server" DataSourceID="LinqDataSource1">
                <Series>
                    <asp:Series Name="Series1" XValueMember="Tid" YValueMembers="Aamount"></asp:Series>
                </Series>
                <ChartAreas>
                    <asp:ChartArea Name="ChartArea1"></asp:ChartArea>
                </ChartAreas>
            </asp:Chart>

            <asp:Chart ID="Chart2" runat="server" DataSourceID="">
                <Series>
                    <asp:Series Name="Series1"></asp:Series>
                </Series>
                <ChartAreas>
                    <asp:ChartArea Name="ChartArea1"></asp:ChartArea>
                </ChartAreas>
            </asp:Chart>
            
            <asp:LinqDataSource ID="LinqDataSource1" runat="server" ContextTypeName="MyUAMS.DAL.DataClasses1DataContext" EntityTypeName="" OrderBy="Tid" Select="new (Aamount, Tid)" TableName="Asset_Table" Where="Tid != @Tid">
                <WhereParameters>
                    <asp:Parameter DefaultValue="1" Name="Tid" Type="Int32" />
                </WhereParameters>
            </asp:LinqDataSource>
        </div>
    </form>
    <script src="Scripts/MyWork.js"></script>
    <script>
        // 获取侧边栏和图片按钮元素
        var sidebar = document.querySelector('.menus');
        var menuToggle = document.querySelector('.menu-toggle');

        // 为图片按钮添加点击事件
        menuToggle.addEventListener('click', function () {
            // 切换侧边栏的显示和隐藏
            var sidebarStyle = sidebar.style;
            if (sidebarStyle.left === '-200px') {
                sidebarStyle.left = '0';
            } else {
                sidebarStyle.left = '-200px';
            }
        });
    </script>
</body>
</html>
